<?php
	//print_r($data_var);
?>

<h3>Add items:</h3><br />

<?php
	if (isset($items) && is_array($items))
	{
	echo 'this should work';
?>

<table>
<?php foreach ($items as $item) : ?>
<tr>
<td><?php echo $item['Item']['id']; ?></td>
<td><?php echo $item['Item']['title']; ?></td>
<td><?php echo $item['Item']['prompt']; ?></td>
<tr>

<? endforeach; ?>
</table>

<?php
	}
?>

<?php echo $form->create('Item'/*, array('action'=>'post_add')*/);?>
   <fieldset>
      <legend>Add New Item</legend>
   <?php
		echo $form->input('title');
		echo $form->input('prompt');
		//echo $form->input('next');
	?>
   </fieldset>
   
<?= $form->hidden('Item.survey_id', array('value' => $survey_id)); ?>

<?php echo $form->end('Submit');?>